Skip to content

Add types to NumberParseException#672

Merged
giggsey merged 1 commit intogiggsey:masterfrom
BenMorel:parse_exception_types
Feb 24, 2025
Merged

Add types to NumberParseException#672
giggsey merged 1 commit intogiggsey:masterfrom
BenMorel:parse_exception_types

Conversation

@BenMorel
Copy link
Contributor

No description provided.

@BenMorel
Copy link
Contributor Author

@giggsey Would you be open to another PR adding strong types to properties, parameters, return types throughout the codebase? The codebase can be modernized quite a lot, while keeping compatibility with PHP 7.4.

@giggsey giggsey merged commit 0ecf954 into giggsey:master Feb 24, 2025
6 of 7 checks passed
@giggsey
Copy link
Owner

giggsey commented Feb 24, 2025

Thanks.

I think adding stronger types will be fine for @internal classes, or private properties. Anything else would be a BC break, which I'm not keen on.

libphonenumber-for-php-lite has the stronger types from the more modern PHP.

@BenMorel
Copy link
Contributor Author

I understand, matching Google's releases implies not being able to break things whenever you want. If Google ever releases a v9, maybe it'll be an opportunity to perform this upgrade!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants